package org.geektimes.injection.component;

import org.geektimes.injection.stream.ResponseHandlerConsumer;

import java.lang.reflect.Method;
import java.util.Set;

/**
 * @FileName: ControllerComponentBean
 * @Description: TODO
 * @Author: MaWenHao
 * @Created: 2021/3/9 - 下午11:43
 */
public interface ControllerComponent extends Component {

    /**
     * 获取请求映射路径
     * @return
     */
    String getRequestPath();

    /**
     * 获取请求处理方法
     * @return
     */
    Method getHandlerMethod();

    /**
     * 获取支持的HTTP方法
     * @return
     */
    Set<String> getSupportedHttpMethods();

    /**
     * 获取应答处理器
     * @return
     */
    ResponseHandlerConsumer<Object> getResponseHandler();
}
